package com.htime.service.impl;

import com.htime.dao.UserDAO;
import com.htime.domain.User;
import com.htime.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by HTime on 2017/3/3.
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDAO userDAO;

    @Override
    public User getUserById(Long uid) {
        return userDAO.getUserById(uid);
    }

    @Override
    public User getUserByAccount(String userName, String userPwd) {
        User user  = new User();
        user.setUserName(userName);
        user.setUserPwd(userPwd);
        User resUser = userDAO.getUserByAccount(user);
        return resUser;
    }

}
